Skip to content

feat: add MiniMax as a model provider (default M3)#2717

Open
octo-patch wants to merge 2 commits into
ModelEngine-Group:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as a model provider (default M3)#2717
octo-patch wants to merge 2 commits into
ModelEngine-Group:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

@octo-patch octo-patch commented Mar 22, 2026

Copy link
Copy Markdown

Summary

Add MiniMax as a first-class model provider in nexent, with MiniMax-M3 as the default LLM.

What is MiniMax?

MiniMax is a leading AI company offering powerful LLM and embedding models:

  • MiniMax-M3 (default): Latest flagship model with 512K context, up to 128K output, image input support
  • MiniMax-M2.7 / MiniMax-M2.7-highspeed: 192K context window (previous generation, kept for back-compat)
  • embo-01: Embedding model with 1536 dimensions

All models are accessible via an OpenAI-compatible API at https://api.minimax.io/v1.

Changes

Backend (5 files):

  • backend/services/providers/minimax_provider.py — New MiniMaxModelProvider with model type classification (LLM, embedding, TTS, STT, reranker, VLM) and known context window sizes for M3 / M2.7 / M2.7-highspeed
  • backend/consts/provider.py — Add MINIMAX enum, base URL, and models endpoint
  • backend/services/providers/__init__.py — Export MiniMaxModelProvider
  • backend/services/model_provider_service.py — Wire MiniMax into factory
  • backend/services/model_management_service.py — Add MiniMax base URL for batch create

Frontend (5 files):

  • frontend/hooks/model/useMinimaxModelList.ts — Batch import hook (follows DashScope pattern)
  • frontend/app/[locale]/models/components/model/ModelAddDialog.tsx — Add MiniMax to provider dropdown
  • frontend/const/modelConfig.ts — Provider constants (icon, hint, link)
  • frontend/public/locales/{en,zh}/common.json — i18n translations
  • frontend/public/minimax.png — Provider icon

Tests (1 file):

  • test/backend/services/providers/test_minimax_provider.py — Unit tests covering all model types, known context windows (M3 / M2.7 / M2.7-highspeed), error handling, authorization header, and mixed type classification

Why

MiniMax-M3 is the latest model, with a 512K context window, up to 128K output, and image input support. M2.7 is retained as a back-compatibility alternative; older M2.5 entries have been removed.

Test Plan

  • Unit tests updated and passing (M3 / M2.7 / M2.7-highspeed)
  • All existing provider tests continue to pass
  • Manual verification: batch import MiniMax models with API key
  • Manual verification: MiniMax models appear in model list with correct types

Add MiniMax (https://www.minimaxi.com/) as a first-class model provider
alongside SiliconFlow, DashScope, and TokenPony. MiniMax offers LLM models
(M2.7 with 1M context, M2.5/M2.5-highspeed with 204K context) and the
embo-01 embedding model.

Backend:
- Add MiniMaxModelProvider with model type classification (LLM, embedding,
  TTS, STT, reranker, VLM) and known context window sizes
- Register provider in factory, enum, and base URL constants
- Wire into model_management_service for batch create flow

Frontend:
- Add useMinimaxModelList hook for batch import
- Add MiniMax option in ModelAddDialog provider dropdown
- Add provider constants (icon, hint, link) and i18n translations (en/zh)

Tests:
- Add 16 unit tests covering all model types, error handling, context
  windows, and auth header verification
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
30.3% Duplication on New Code (required ≤ 3%)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

- Add MiniMax-M3 to model context map and set as default
- Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed (correct 192K context)
- Remove older M2.5/M2.5-highspeed models
- Update related unit tests to match the new model list
@octo-patch octo-patch requested a review from Dallas98 as a code owner June 7, 2026 06:01
@octo-patch octo-patch changed the title feat: add MiniMax as a model provider feat: add MiniMax as a model provider (default M3) Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant